/*
 * Square.cpp
 *
 *  Created on: Mar 30, 2011
 *      Author: cnwilson
 */

#include "../inc/Square.h"

	Square::Square():loc(-1,-1){
		piece=NULL;
	}

	Square::Square(Position pos):loc(pos){
		piece=NULL;
	}

	Square& Square::operator=(const Square& other){
		if (this!=&other){
			loc=other.loc;
			piece=other.piece;
		}
		return *this;
	}
	Square::~Square(){

	}
	bool Square::isOccupied(){
		return piece!=NULL;
	}
	void Square::setPiece(Piece *p){
		piece=p;
	}
	Piece* Square::getPiece(){
		return piece;
	}
	PieceType Square::getPieceType(){
			return piece->getType();
	}
	Color Square::getPieceColor(){
			return piece->getColor();
	}
